From c51b5d9a5f217f8aa59c4bdcb04eb3c87f5129b3 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 23 May 2022 19:32:42 +0200
Subject: fix: ensure all topics/thematics have the base url

---
 src/pages/article/[slug].tsx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'src/pages/article/[slug].tsx')

diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx
index c72d48e..5e75ae7 100644
--- a/src/pages/article/[slug].tsx
+++ b/src/pages/article/[slug].tsx
@@ -81,7 +81,7 @@ const ArticlePage: NextPageWithLayout<ArticlePageProps> = ({
     thematics:
       thematics &&
       thematics.map((thematic) => (
-        <Link key={thematic.id} href={`/thematique/${thematic.slug}`}>
+        <Link key={thematic.id} href={thematic.url}>
           {thematic.name}
         </Link>
       )),
@@ -99,11 +99,7 @@ const ArticlePage: NextPageWithLayout<ArticlePageProps> = ({
       label: footerMetaLabel,
       value: topics.map((topic) => {
         return (
-          <ButtonLink
-            key={topic.id}
-            target={`/sujet/${topic.slug}`}
-            className={styles.btn}
-          >
+          <ButtonLink key={topic.id} target={topic.url} className={styles.btn}>
             {topic.logo && <ResponsiveImage {...topic.logo} />} {topic.name}
           </ButtonLink>
         );
-- 
cgit v1.2.3

